Things that need to be done on XEP entry: 1] Allocate frame 2] Move more arg above the frame, saving context 3] Set up env, saving closure pointer if closure 4] Move arguments from closure to local home Move old-cont and return-pc to the save locations 5] Argument count checking and dispatching
XEP VOPs:
Allocate-Frame Copy-More-Arg <nargs-tn> 'fixed in a3 => <context>, <count> Setup-Environment Setup-Closure-Environment => <closure> Verify-Argument-Count <nargs-tn> 'count for fixed-arg lambdas Argument-Count-Error <nargs-tn> Drop-thru on hairy arg dispatching Use fast-if-=/fixnum and fast-if-</fixnum for dispatching.
Closure vops: make-closure <fun entry> <slot count> => <closure> closure-init <closure> <values> 'slot
Things that need to be done on all function entry: – Move arguments to the variable home (consing value cells as necessary) – Move environment values to the local home – Move old-cont and return-pc to the save locations